libxc/progress: Extend the progress interface
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Jul 2014 12:05:27 +0000 (13:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 5 May 2015 13:29:45 +0000 (14:29 +0100)
commitcc3fefc4f1c7ea285f735a9106173fb238728a22
tree9ae96eff0c3192bc0ed9a8f5d2acd099ee6688cb
parent76eb7cef6b84ca804f4db340e23ad9c501767c32
libxc/progress: Extend the progress interface

Progress information is logged via a different logger to regular libxc log
messages, and currently can only express a range.  However, not everything
which needs reporting as progress comes with a range.  Extend the interface to
allow reporting of a single statement.

The programming interface now looks like:
  xc_set_progress_prefix()
    set the prefix string to be used
  xc_report_progress_single()
    report a single action
  xc_report_progress_step()
    report $X of $Y

The new programming interface is implemented in a compatible way with the
existing caller interface (by reporting a single action as "0 of 0").

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxc/xc_domain_restore.c
tools/libxc/xc_domain_save.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h
tools/libxc/xtl_core.c